package com.dlu.safe_construction.dto;

import com.dlu.safe_construction.model.IllRecord;
import lombok.Getter;
import lombok.Setter;

/**
 * Created by  lijiaxing on 2022/3/31 16:35
 *
 * @author lijiaxing
 */
@Getter
@Setter
public class IllRecordDTO extends IllRecord {
    private String ownerName;

    private String ownerPhone;

    private Integer score;

    public static IllRecordDTO fromIllRecord(IllRecord illRecord) {
        IllRecordDTO illRecordDTO = new IllRecordDTO();
        illRecordDTO.setRecordId(illRecord.getRecordId());
        illRecordDTO.setOwnerId(illRecord.getOwnerId());
        illRecordDTO.setDate(illRecord.getDate());
        illRecordDTO.setPictureOne(illRecord.getPictureOne());
        illRecordDTO.setPictureTwo(illRecord.getPictureTwo());
        illRecordDTO.setAreaId(illRecord.getAreaId());
        illRecordDTO.setSpaceId(illRecord.getSpaceId());
        return illRecordDTO;
    }
}
